package com.maimao.order.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.model.user.input.UpdateIntegralInput;
import com.maimao.order.client.factory.GoodsFallBackFactory;
import com.maimao.order.client.factory.UserFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author MaoLin Wang
 * @date 2021/1/15 2:16 下午
 */
@RequestMapping("/web/member")
@FeignClient(value = ServiceContainer.USER_SERVICE, fallbackFactory = UserFallBackFactory.class, configuration = FeignInterceptor.class)
public interface UserClient {

    @PostMapping("/client/update-integral")
    public Result updateIntegral(@RequestBody UpdateIntegralInput integralInput);

    @GetMapping("/query-username")
    public Result<String> queryUserNameById(@RequestParam("id") Long id);
}
